#pragma once

#define SIZE 1024

enum
{
    FILE_NONE = 0,
    FILE_LINE = 1,
    FILE_FULL = 2,
};


struct IO_FILE
{
    int flag;//刷新方式
    int fileno;//文件描述符
    char outbuffer[SIZE];
    int size;
    int capacity;
};

typedef struct IO_FILE myFILE;

myFILE *mfopen(const char *filename, const char *mode);

int mfwrite(const void *ptr, int num, myFILE *stream);

void mfflush(myFILE*stream);

void mfclose(myFILE*stream);